﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace PitOfDespair
{
    class Character:GameObjects.GameObject
    {

        public byte Level { get; private set; }
       
        // Amount of hit points that character has
         public int Health { get; set; }

        
        public void Update() 
        {
        }

        private ulong xp;
        public void GainExp(uint xp)
        {
            this.xp += xp;
        }
      

        public Character(byte level, int toHit, int avoidance, int maxHealth, int currentHealth,Texture2D texture, Rectangle textureSrcRect):base(texture,textureSrcRect)
        {
            this.ToHit = toHit;
            this.Avoidance = avoidance;
            this.MaxHealth = maxHealth;
            this.Health= currentHealth;
            this.Level = level;
        }
        /// <summary>
        /// Model simple D&D THAC0 and d20 roll
        /// </summary>
        public int ToHit { get; private set; }
        /// <summary>
        /// Model simple D&D AC as avoidance
        /// </summary>
        public int Avoidance { get; private set; }

        public int MaxHealth { get; private set; }

        /// <summary>
        /// Character has hit something, how much damage before accounting for enemy damage reduction(s)
        /// </summary>
        /// <returns></returns>
        public int RollDamage()
        {
            return 1;
        }


       

        
    }
}
